package com.cloudfun.campusshare.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @author : ashsr.zhang
 * @date : 2020/3/3 15:31
 * @Version : v1.0
 * @description  学校
 **/
@Data
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "school")
public class SchoolEntity extends BaseEntity{
    @Id
    @GenericGenerator(name = "id_uuid", strategy = "uuid")
    @GeneratedValue(generator = "id_uuid")
    @Column(name = "id", nullable = false, unique = true, length = 40)
    private String id;

    @Column(name = "name", columnDefinition = ("varchar(255) default null comment '学校名称'"))
    private String name;

    @Column(name = "province", columnDefinition = ("varchar(255) default null comment '学校省份'"))
    private String  province;

    @Column(name = "city", columnDefinition = ("varchar(255) default null comment '所在地区'"))
    private String city;

    @Column(name = "educate_level", columnDefinition = ("varchar(32) default null comment '办学层次'"))
    private String educateLevel;

    @Column(name = "running_attribute", columnDefinition = ("varchar(32) default null comment '办学属性'"))
    private String runningAttribute;

    @Column(name = "type", columnDefinition = ("varchar(32) default null comment '院校类型'"))
    private String type;

    @Column(name = "rank", columnDefinition = ("int(11) default null comment '学校排名'"))
    private Integer rank;

    @Column(name = "student_number", columnDefinition = ("int(11) default null comment '全日制在校学生人数'"))
    private Integer studentNumber;

    @Column(name = "male_ratio", columnDefinition = ("int(11) default null comment '男生所占比例'"))
    private Integer maleRatio;

    @Column(name = "composite_score", columnDefinition = ("float(11) default null comment '综合评分'"))
    private Float compositeScore;
}
